﻿<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:igCA="http://infragistics.com/Chart"
    xmlns:cc="clr-namespace:CCSManager"
x:Class="CCSManager.Dashboard"
x:Name="Window"
Title="Client Cloud Services"
Width="1280" Height="750" SnapsToDevicePixels="True" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" Background="{DynamicResource BG_bronze}" Foreground="#FF869548" MaxWidth="1280" MinWidth="1280" MinHeight="750" WindowStartupLocation="CenterScreen">

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="theme\bronze\rds\Chart2D.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>


    <Grid x:Name="LayoutRoot">
        <StackPanel Margin="0,0,0,0" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Visible">
            <!-- SignIn-SignOut -->
            <Grid Grid.Column="0" Grid.Row="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="130"/>
                    <ColumnDefinition Width="50"/>
                </Grid.ColumnDefinitions>
                <Grid Grid.Column="1">
                    <Button Name="SignOutButton" Margin="0,10,0,20" Style="{DynamicResource SimpleButton}" VerticalAlignment="Top" Height="26" Content="Sign Out" HorizontalAlignment="Stretch" Click="SignOutButton_Click" />
                </Grid>
            </Grid>

            <!-- TitleBar -->
            <Grid Style="{DynamicResource TitleBarBG}" Height="35">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="330"/>
                    <ColumnDefinition Width="50"/>
                </Grid.ColumnDefinitions>
                <TextBlock Style="{DynamicResource TitleBarText}" Text="CCS Manager" FontFamily="Segoe" FontWeight="Light" Margin="50,-2,0,0" VerticalAlignment="Center" />
                <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                    <Canvas Width="24" Height="24" Background="{DynamicResource StatusOK}" VerticalAlignment="Top" Margin="0,4,10,0" />
                    <TextBlock Style="{DynamicResource NavBarText}" Margin="0,0,0,0" Foreground="#7FFFFFFF" >Server Status -</TextBlock>
                    <TextBlock Style="{DynamicResource NavBarText}" Margin="6,0,0,0" Foreground="#FF9FD05E" FontWeight="Bold" ><Run Foreground="#FF98E434" Text="Running"/></TextBlock>
                    <Border BorderThickness="1,0,0,0" Margin="20,0,0,0" Padding="20,0,0,0">
                        <Border.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#7FFFFFFF" Offset="0.2"/>
                                <GradientStop Color="#00FFFFFF" Offset="1"/>
                                <GradientStop Color="#00FFFFFF" Offset="0"/>
                                <GradientStop Color="#7FFFFFFF" Offset="0.8"/>
                            </LinearGradientBrush>
                        </Border.BorderBrush>
                        <TextBlock Style="{DynamicResource NavBarText}" Margin="0,0,0,0"  VerticalAlignment="Center">Azure Account</TextBlock>
                    </Border>
                </StackPanel>
            </Grid>

            <!-- NavBar -->
            <!-- List of projects -->
            <Grid Margin="50">
                <Grid.RowDefinitions>
                    <RowDefinition Height="36"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="6"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="6"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="6"/>
                </Grid.ColumnDefinitions>

                <!-- header -->
                <!-- inner content -->

                <!-- header -->
                <Border Grid.Column="0" Grid.Row="0" Style="{DynamicResource ContainerOutline}" Grid.ColumnSpan="3" Grid.RowSpan="3" />
                <TextBlock Grid.Column="1" Grid.Row="0" Style="{DynamicResource SectionHead1}"  VerticalAlignment="Top" Margin="0,4,0,0" FontWeight="Normal" ><Run Text="Applications"/></TextBlock>
                <Button Grid.Column="1" Grid.Row="0"  Margin="0,5,0,0" Style="{DynamicResource SimpleButton}" VerticalAlignment="Top" Height="26" Content="Register New App" HorizontalAlignment="Right" Width="192" Name="RegisterAppButton" Click="RegisterAppButton_Click" />


                <!-- inner content -->
                <Grid Grid.Column="1" Grid.Row="1" Name="AppStatusGrid">

                    <Grid.RowDefinitions>
                        <RowDefinition Height="30"/>
                        <RowDefinition Height="30"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="345"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                        <ColumnDefinition Width="80"/>
                    </Grid.ColumnDefinitions>


                    <!-- row 0 -->
                    <Border  Grid.Row="0" Grid.Column="0"  Grid.RowSpan="2" CornerRadius="6,6,0,0"  Grid.ColumnSpan="11" >
                        <Border.Background>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="{StaticResource Color1b}" Offset="0"/>
                                <GradientStop Color="{StaticResource Color1b}" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                    </Border>




                    <Border  Grid.Row="0" Grid.Column="0"  Grid.RowSpan="2" Style="{DynamicResource TableHeadBackground}" CornerRadius="6,0,0,0"  >
                        <TextBlock Style="{DynamicResource TableColHead}" Text="App Name"  Margin="8,0,0,0" HorizontalAlignment="Center"/>
                    </Border>
                    <Border  Grid.Row="0" Grid.Column="1"  Grid.RowSpan="2" Style="{DynamicResource TableHeadBackground}"  >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" Text="Feedback"  />
                    </Border>
                    <Border  Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" Style="{DynamicResource TableHeadBackground}">
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Bottom" Text="Revenue" Foreground="#FF495E69" />
                    </Border>
                    <Border  Grid.Row="1" Grid.Column="2" Style="{DynamicResource TableHeadBackground}" >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Top" Text="Recent $"  />
                    </Border>
                    <Border  Grid.Row="1" Grid.Column="3" Style="{DynamicResource TableHeadBackground}" >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Top" Text="Total $"   />
                    </Border>
                    <Border  Grid.Row="0" Grid.Column="4" Grid.RowSpan="2" Style="{DynamicResource TableHeadBackground}"  >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" Text="Licensed Users" TextAlignment="Center"   />
                    </Border>
                    <Border  Grid.Row="0" Grid.Column="5" Grid.ColumnSpan="2" Style="{DynamicResource TableHeadBackground}">
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Bottom"  Text="Installs"  />
                    </Border>
                    <Border  Grid.Row="1" Grid.Column="5" Style="{DynamicResource TableHeadBackground}" >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Top" Text="Recent"  />
                    </Border>
                    <Border  Grid.Row="1" Grid.Column="6" Style="{DynamicResource TableHeadBackground}" >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Top" Text="Total"  />
                    </Border>
                    <Border  Grid.Row="0" Grid.Column="7" Grid.RowSpan="2" Style="{DynamicResource TableHeadBackground}"  >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" Text="Upcoming Trial Expirations" TextAlignment="Center"  />
                    </Border>
                    <Border  Grid.Row="0" Grid.Column="8" Grid.RowSpan="2" Style="{DynamicResource TableHeadBackground}" >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" Text="Upcoming License Expirations" TextAlignment="Center"  />
                    </Border>
                    <Border  Grid.Row="0" Grid.Column="9" Grid.ColumnSpan="2" Style="{DynamicResource TableHeadBackground}" CornerRadius="0,6,0,0">
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Bottom"  Text="Errors"  />
                    </Border>
                    <Grid  Grid.Row="1" Grid.Column="9" Style="{DynamicResource TableHeadBackground}" >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Top" Text="Recent"  />
                    </Grid>
                    <Grid  Grid.Row="1" Grid.Column="10" Style="{DynamicResource TableHeadBackground}" >
                        <TextBlock Style="{DynamicResource TableColHead_AlignC}" VerticalAlignment="Top" Text="Total"   />
                    </Grid>
                </Grid>
            </Grid>
            <Grid>
                <!-- defines this part of the page into two columns -->
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width=".5*"/>
                    <ColumnDefinition Width=".5*"/>
                </Grid.ColumnDefinitions>

                <!-- left column contents -->
                <StackPanel Grid.Column="0" Margin="47,0,28,50">

                    <!-- widget -->
                    <Border Style="{DynamicResource ContainerOutline}" CornerRadius="12,12,12,12">
                        <StackPanel>
                            <Grid Margin="6,0,6,0" VerticalAlignment="Top" >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="24"/>
                                </Grid.ColumnDefinitions>

                                <TextBlock Style="{DynamicResource SectionHead1}"  VerticalAlignment="Top" Margin="0,4,0,0" FontWeight="Normal" ><Run Text="Combined Revenue"/></TextBlock>

                            </Grid>
                            <TabControl Margin="6,0,6,6" Style="{DynamicResource SimpleTabControl}" IsSynchronizedWithCurrentItem="True" Grid.Column="1" HorizontalAlignment="Stretch">
                                <TabItem Style="{DynamicResource SimpleTabItem}" Header="Over Time">
                                    <Grid Margin="0,9,0,0" Height="200" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Visible">
                                        <!-- XAM Chart -->
                                        <igCA:XamChart x:Name="CombinedRevenueOverTimeChart" Style="{StaticResource XamChartStyle}" Margin="0,-8,0,0" View3D="False">
                                            <!-- Legend -->
                                            <igCA:XamChart.Legend>
                                                <igCA:Legend/>
                                            </igCA:XamChart.Legend>
                                            <!-- Scene -->
                                            <igCA:XamChart.Scene>
                                                <igCA:Scene BorderBrush="Black">
                                                    <igCA:Scene.GridArea>
                                                        <igCA:GridArea Style="{StaticResource GridAreaStyle}"/>
                                                    </igCA:Scene.GridArea>
                                                </igCA:Scene>
                                            </igCA:XamChart.Scene>
                                            <!-- Axes -->
                                            <igCA:XamChart.Axes>
                                                <igCA:Axis
			                                    AxisType="PrimaryX"
			                                    Animation="{StaticResource AxisAnimation}"
			                                    MajorGridline="{StaticResource AnimationMarkX}"
			                                    Label="{StaticResource AnimationLabelsX}"/>
                                                <igCA:Axis
					                            AxisType="PrimaryY"
					                            Animation="{StaticResource AxisAnimation}"
					                            MajorGridline="{StaticResource AnimationMarkY}"
					                            Label="{StaticResource AnimationLabelsY}">
                                                </igCA:Axis>
                                            </igCA:XamChart.Axes>
                                        </igCA:XamChart>
                                    </Grid>
                                </TabItem>
                                <TabItem Style="{DynamicResource SimpleTabItem}" Header="By Volume">
                                    <Grid>
                                        <TextBlock><Run Text="N/A"/></TextBlock>
                                    </Grid>
                                </TabItem>
                                <TabItem Style="{DynamicResource SimpleTabItem}" Header="By Subscription">
                                    <Grid>
                                        <TextBlock><Run Text="N/A"/></TextBlock>
                                    </Grid>
                                </TabItem>
                            </TabControl>

                            <!-- inner content -->
                        </StackPanel>
                    </Border>
                </StackPanel>



                <!-- right column contents -->
                <StackPanel Grid.Column="1" Margin="25,0,50,50">

                    <!-- widget -->
                    <Border Style="{DynamicResource ContainerOutline}" CornerRadius="12,12,12,12">
                        <StackPanel>
                            <Grid Margin="6,0,6,0" VerticalAlignment="Top" >
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*"/>
                                    <ColumnDefinition Width="24"/>
                                </Grid.ColumnDefinitions>

                                <TextBlock Style="{DynamicResource SectionHead1}"  VerticalAlignment="Top" Margin="0,4,0,0" FontWeight="Normal" ><Run Text="Combined Installations"/></TextBlock>

                            </Grid>
                            <TabControl Margin="6,0,6,6" Style="{DynamicResource SimpleTabControl}" IsSynchronizedWithCurrentItem="True" Grid.Column="1" HorizontalAlignment="Stretch">
                                <TabItem Style="{DynamicResource SimpleTabItem}" Header="Over Time">
                                    <Grid Margin="0,9,0,0" Height="200" ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Visible">
                                        <igCA:XamChart x:Name="CombinedInstallationsOverTimeChart" Style="{StaticResource XamChartStyle}" Margin="0,-8,0,0" View3D="False">
                                            <!-- Legend -->
                                            <igCA:XamChart.Legend>
                                                <igCA:Legend/>
                                            </igCA:XamChart.Legend>
                                            <!-- Scene -->
                                            <igCA:XamChart.Scene>
                                                <igCA:Scene BorderBrush="Black">
                                                    <igCA:Scene.GridArea>
                                                        <igCA:GridArea Style="{StaticResource GridAreaStyle}"/>
                                                    </igCA:Scene.GridArea>
                                                </igCA:Scene>
                                            </igCA:XamChart.Scene>
                                            <!-- Axes -->
                                            <igCA:XamChart.Axes>
                                                <igCA:Axis
			                                    AxisType="PrimaryX"
			                                    Animation="{StaticResource AxisAnimation}"
			                                    MajorGridline="{StaticResource AnimationMarkX}"
			                                    Label="{StaticResource AnimationLabelsX}"/>
                                                <igCA:Axis
					                            AxisType="PrimaryY"
					                            Animation="{StaticResource AxisAnimation}"
					                            MajorGridline="{StaticResource AnimationMarkY}"
					                            Label="{StaticResource AnimationLabelsY}">
                                                </igCA:Axis>
                                            </igCA:XamChart.Axes>
                                        </igCA:XamChart>
                                    </Grid>
                                </TabItem>
                                <TabItem Style="{DynamicResource SimpleTabItem}" Header="By Volume">
                                    <Grid>
                                        <TextBlock><Run Text="N/A"/></TextBlock>
                                    </Grid>
                                </TabItem>
                                <TabItem Style="{DynamicResource SimpleTabItem}" Header="By Subscription">
                                    <Grid>
                                        <TextBlock><Run Text="N/A"/></TextBlock>
                                    </Grid>
                                </TabItem>
                            </TabControl>

                            <!-- inner content -->
                        </StackPanel>
                    </Border>
                </StackPanel>






            </Grid>
        </StackPanel>



    </Grid>
</Window>